import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;

/**
 * Created by tys on 2019/2/11.
 */

public class AA<T> implements Ex<T>{

    void aa(){

        Type genericSuperclass = this.getClass().getGenericSuperclass();
        System.out.println(genericSuperclass.toString());

        TypeVariable<? extends Class<? extends Ex>>[] typeParameters = this.getClass().getTypeParameters();
        for (TypeVariable<? extends Class<? extends Ex>> typeParameter : typeParameters) {
            System.out.println(typeParameter.getName());
        }
    }
}
